import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_base_kit/common/loading_widget.dart';
import 'package:flutter_base_kit/home/video/controller/video_list_controller.dart';
import 'package:flutter_base_kit/home/video/video_details_widget.dart';
import 'package:get/get.dart';

/// 创建人： Created by zhaolong
/// 创建时间：Created by  on 2020/12/14.
///
/// 可关注公众号：我的大前端生涯   获取最新技术分享
/// 可关注网易云课堂：https://study.163.com/instructor/1021406098.htm
/// 可关注博客：https://blog.csdn.net/zl18603543572
///
/// 代码清单
///代码清单
class ListViewItemWidget extends StatelessWidget {
  final int widgetIndex;

  ListViewItemWidget({Key? key, required this.widgetIndex}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 2),
      padding: EdgeInsets.all(8),
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [Icon(Icons.one_k), Text("早起的年轻人")],
          ),
          SizedBox(
            height: 8,
          ),
          Container(
            height: 220,
            child: GetBuilder(builder: (VideoListController controller) {
              return buildVideoWidget();
            },),
          )
        ],
      ),
    );
  }

  Widget buildVideoWidget() {
    return VideoDetailsWidget(widgetIndex: widgetIndex);
  }
}
